import type { PageSiderMenuGroup } from "@/pages/main/config/types.ts";
import { hci } from "@/components/framework/icon";
import { defineAsyncComponent } from "vue";

const GenericManagerView = defineAsyncComponent(() => import("./view/generic-env-manager.vue"));

export const devEnvMenuItems: PageSiderMenuGroup[] = [
  {
    key: "lang-tools",
    name: "语言环境",
    type: "group",
    children: [
      {
        key: "java.jdk",
        name: "JDK",
        icon: hci("icon-java"),
        component: GenericManagerView,
      },
      {
        key: "java.maven",
        name: "Maven",
        icon: hci("icon-maven"),
        component: GenericManagerView,
      },
      {
        key: "java.mvnd",
        name: "Maven Daemon",
        icon: hci("icon-maven1"),

        component: GenericManagerView,
      },
      {
        key: "java.gradle",
        name: "Gradle",
        icon: hci("icon-gradle"),
        component: () => import("./java/gradle/gradle-manager.vue"),
      },
      {
        key: "java.android",
        name: "Android",
        icon: hci("icon-android"),
        component: () => import("./java/android/android-manager.vue"),
      },
      {
        key: "nodejs.sdk",
        name: "NodeJS",
        icon: hci("icon-nodejs"),
        component: GenericManagerView,
      },
      {
        key: "python.sdk",
        name: "Python",
        icon: hci("icon-python"),
        component: GenericManagerView,
      },
      {
        key: "cangjie",
        name: "仓颉",
        icon: hci("icon-cangjie"),
        component: () => import("./cangjie/cangjie-manager.vue"),
      },
      {
        key: "golang.sdk",
        name: "Golang",
        icon: hci("icon-golang"),
        component: GenericManagerView,
      },
    ],
  },
  {
    key: "database",
    name: "数据库",
    type: "group",
    children: [
      {
        key: "db.mysql",
        name: "MySQL",
        icon: hci("icon-mysql"),
        component: GenericManagerView,
      },
      {
        key: "db.mariadb",
        name: "MariaDB",
        icon: hci("icon-mariadb"),
        component: GenericManagerView,
      },
      {
        key: "db.mongodb",
        name: "MongoDB",
        icon: hci("icon-mongo"),
        component: GenericManagerView,
      },
      {
        key: "db.pgsql",
        name: "PostgreSQL",
        icon: hci("icon-postgresql"),
        component: GenericManagerView,
      },
      {
        key: "db.redis",
        name: "Redis Windows",
        icon: hci("icon-redis"),
        external: "https://github.com/redis-windows/redis-windows",
      },
      {
        key: "db.elasticsearch",
        name: "Elasticsearch",
        icon: hci("icon-elastic"),
        external: "https://www.elastic.co/cn/downloads/elasticsearch",
      },
      {
        key: "db.influxdb",
        name: "InfluxDB",
        icon: hci("icon-influxdb"),
        external: "https://github.com/influxdata/influxdb",
      },
    ],
  },
  {
    key: "middleware",
    name: "中间件",
    type: "group",
    children: [
      {
        key: "md.nacos",
        name: "Nacos",
        icon: hci("icon-nacos"),
        component: GenericManagerView,
      },
      {
        key: "md.zookeeper",
        name: "Zookeeper",
        icon: hci("icon-zookeeper"),
        component: GenericManagerView,
      },
      {
        key: "md.rocketmq",
        name: "RocketMQ",
        icon: hci("icon-rocketmq"),
        component: GenericManagerView,
      },
      {
        key: "md.kafka",
        name: "Kafka",
        icon: hci("icon-kafka"),
        component: GenericManagerView,
      },
    ],
  },
  {
    key: "vsc",
    name: "版本控制",
    type: "group",
    children: [
      {
        key: "vsc.git",
        name: "Git for Windows",
        icon: hci("icon-git"),
        component: () => import("./vsc/git-manager.vue"),
      },
    ],
  },
];
